﻿using LServer.Core.Utils;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System.Text;

namespace LServer.WebAccount.Controllers
{
    [Route("[controller]")]
    [ApiController]
    public class VersionController : ControllerBase
    {
        [HttpGet]
        public string Get(int gameId,string clientVersion)
        {
            //StringBuilder stringBuilder = new StringBuilder();
            //stringBuilder.Append("{:");
            //stringBuilder.Append("1");
            //stringBuilder.Append(",:{");
            //stringBuilder.Append("Version:");
            //stringBuilder.Append("1.0.1");
            //stringBuilder.Append("}");
            //stringBuilder.Append("}");

            Dictionary<string, object> retDic = new Dictionary<string, object>(2);
            retDic["Status"] = 1;
            Dictionary<string, object> contentDic = new Dictionary<string, object>(1);
            retDic["Content"] = contentDic;
            contentDic["Version"] = "1.0.2";

            return JsonConvert.SerializeObject(retDic);
        }
    }
}
